package model

import "time"

type ReceiveTags []string

type DisputeOrderList []map[string]interface{}

type Shipment struct {
	ShopId                  uint             `json:"shop_id" bson:"shop_id"`
	BrokenQuantity          uint             `json:"brokenQuantity" bson:"brokenQuantity"`
	IsAllBoxDisputeFinished int              `json:"isAllBoxDisputeFinished" bson:"isAllBoxDisputeFinished"`
	ReceiveTags             ReceiveTags      `json:"receiveTags" bson:"receiveTags"`
	FulfillmentCenterId     string           `json:"fulfillmentCenterId" bson:"fulfillmentCenterId"`
	FulfillmentCenterName   string           `json:"fulfillmentCenterName" bson:"fulfillmentCenterName"`
	WarehouseName           string           `json:"warehouseName" bson:"warehouseName"`
	ShipQuantity            int              `json:"shipQuantity" bson:"shipQuantity"`
	CreatedAt               int              `json:"createdAt" bson:"createdAt"`
	UnknownQuantity         int              `json:"unknownQuantity" bson:"unknownQuantity"`
	WarehouseId             int              `json:"warehouseId" bson:"warehouseId"`
	ShipmentId              string           `json:"shipmentId" bson:"shipmentId"`
	ReceivedQuantity        int              `json:"receivedQuantity" bson:"receivedQuantity"`
	ShippedAt               int              `json:"shippedAt" bson:"shippedAt"`
	PlanId                  string           `json:"planId" bson:"planId"`
	CrossBorder             int              `json:"crossBorder" bson:"crossBorder"`
	ShipmentStatusDesc      string           `json:"shipmentStatusDesc" bson:"shipmentStatusDesc"`
	ClosedAt                int              `json:"closedAt" bson:"closedAt"`
	ShipmentName            string           `json:"shipmentName" bson:"shipmentName"`
	NormalQuantity          int              `json:"normalQuantity" bson:"normalQuantity"`
	ShipmentStatus          int              `json:"shipmentStatus" bson:"shipmentStatus"`
	DisputeOrderList        DisputeOrderList `json:"disputeOrderList" bson:"disputeOrderList"`
}

type ShipmentWithExtra struct {
	Shipment
	ShipmentShipmentProcess                 *ShipmentShipmentProcess `json:"shipmentProcess" bson:"shipmentProcess"`
}

type ShipmentShipmentProcess struct {
	LastUpdateUser     string `json:"lastUpdateUser" bson:"lastUpdateUser"`
	LastUpdateAt       time.Time `json:"lastUpdateAt" bson:"lastUpdateAt"`
	LastProcessDate    string `json:"lastProcessDate" bson:"lastProcessDate"`
	LastProcessContent string `json:"lastProcessContent" bson:"lastProcessContent"`
	UpdateAtOverTime   string `json:"updateAtOverTime" bson:"updateAtOverTime"`
}

type ShipmentDetailView struct {
	PickUpFeeCur          string                 `json:"pickUpFeeCur" bson:"pickUpFeeCur"`
	ShipToAddress         map[string]interface{} `json:"shipToAddress" bson:"shipToAddress"`
	ReceiveTags           []interface{}          `json:"receiveTags" bson:"receiveTags"`
	PlanQuantity          int                    `json:"planQuantity" bson:"planQuantity"`
	FulfillmentCenterId   string                 `json:"fulfillmentCenterId" bson:"fulfillmentCenterId"`
	FulfillmentCenterName string                 `json:"fulfillmentCenterName" bson:"fulfillmentCenterName"`
	EditStatus            string                 `json:"editStatus" bson:"editStatus"`
	WarehouseName         string                 `json:"warehouseName" bson:"warehouseName"`
	ShipQuantity          int                    `json:"shipQuantity" bson:"shipQuantity"`
	CreatedAt             int64                  `json:"createdAt" bson:"createdAt"`
	ShipFromAddress       map[string]interface{} `json:"shipFromAddress" bson:"shipFromAddress"`
	WarehouseId           int                    `json:"warehouseId" bson:"warehouseId"`
	ShipmentId            string                 `json:"shipmentId" bson:"shipmentId"`
	ReceivedQuantity      int                    `json:"receivedQuantity" bson:"receivedQuantity"`
	ShipType              string                 `json:"shipType" bson:"shipType"`
	ShippedAt             int                    `json:"shippedAt" bson:"shippedAt"`
	CrossBorder           bool                   `json:"crossBorder" bson:"crossBorder"`
	PlanId                string                 `json:"planId" bson:"planId"`
	ShipmentStatusDesc    string                 `json:"shipmentStatusDesc" bson:"shipmentStatusDesc"`
	SkuSpecies            int                    `json:"skuSpecies" bson:"skuSpecies"`
	ClosedAt              int64                  `json:"closedAt" bson:"closedAt"`
	ShipmentName          string                 `json:"shipmentName" bson:"shipmentName"`
	UpdatedAt             int64                  `json:"updatedAt" bson:"updatedAt"`
	ShipmentStatus        int                    `json:"shipmentStatus" bson:"shipmentStatus"`
	ShopId                int                    `json:"shop_id" bson:"shop_id"`
}

type ShipmentTrackBoxView struct {
	SignBy           string        `json:"signBy" bson:"signBy"`
	CreatedAt        int           `json:"createdAt" bson:"createdAt"`
	StatusDesc       string        `json:"statusDesc" bson:"statusDesc"`
	TrackingNo       string        `json:"trackingNo" bson:"trackingNo"`
	LogisticsCompany string        `json:"logisticsCompany" bson:"logisticsCompany"`
	OriginStatus     int           `json:"originStatus" bson:"originStatus"`
	BoxNumber        string        `json:"boxNumber" bson:"boxNumber"`
	BoxSeq           int           `json:"boxSeq" bson:"boxSeq"`
	Disputes         []interface{} `json:"disputes" bson:"disputes"`
	BoxStatus        int           `json:"boxStatus" bson:"boxStatus"`
	Tracks           []interface{} `json:"tracks" bson:"tracks"`
	Status           string        `json:"status" bson:"status"`
	ShopId           int           `json:"shop_id" bson:"shop_id"`
	ShipmentId       string        `json:"shipmentId" bson:"shipmentId"`
}

type ShipmentReceivedDetailView struct {
	Summary    map[string]interface{}   `json:"summary" bson:"summary"`
	Skus       []map[string]interface{} `json:"skus" bson:"skus"`
	ShopId     int                      `json:"shop_id" bson:"shop_id"`
	ShipmentId string                   `json:"shipmentId" bson:"shipmentId"`
}

type ShipmentBoxView struct {
	DisputeDateCountDown int           `json:"disputeDateCountDown" bson:"disputeDateCountDown"`
	IsDisputeClosed      bool          `json:"isDisputeClosed" bson:"isDisputeClosed"`
	WaitConfirmShortage  bool          `json:"waitConfirmShortage" bson:"waitConfirmShortage"`
	ShipmentId           string        `json:"shipmentId" bson:"shipmentId"`
	ShippedAt            int           `json:"shippedAt" bson:"shippedAt"`
	BoxNumber            string        `json:"boxNumber" bson:"boxNumber"`
	DisputeSupport       bool          `json:"disputeSupport" bson:"disputeSupport"`
	BoxStatusDesc        string        `json:"boxStatusDesc" bson:"boxStatusDesc"`
	ClosedAt             int           `json:"closedAt" bson:"closedAt"`
	Disputes             []interface{} `json:"disputes" bson:"disputes"`
	Tracks               []interface{} `json:"tracks" bson:"tracks"`
	BoxStatus            int           `json:"boxStatus" bson:"boxStatus"`
	ShopId               int           `json:"shop_id" bson:"shop_id"`
}
